package Day2025_02_23;

public class SingletonLazy {
    public volatile static SingletonLazy instance = null;
    private SingletonLazy () {}
    public SingletonLazy getInstance () {
        if (instance == null) {
            synchronized (this) {
                if (instance == null) {
                    instance = new SingletonLazy();
                }
            }
        }
        return instance;
    }
}
